<?php

namespace App\Models;


/**
 * @method remember(float|int $cache_expire_in_seconds)
 * @method flushCache(string $rememberCacheTag)
 */
class Link extends Model
{
    //
    protected $fillable = ['title', 'link'];
    protected $cache_expire_in_seconds = 1440 * 60;
    //public $cache_key = 'larabbs_links';
    protected $rememberCacheTag = 'larabbs_links';

    public function getAllCached()
    {
        return $this->remember($this->cache_expire_in_seconds)->cacheTags($this->rememberCacheTag)->get();
    }

}
